package cn.flying.cloud.system.resource.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;

/**
 * <p>
 * 资源信息表
 * </p>
 *
 * @author system
 * @since 2024-06-13 20:08:02
 */
@TableName("sys_res_info")
public class SysResInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 资源ID
     */
    @TableField("res_id")
    private String resId;

    /**
     * 父资源ID
     */
    @TableField("parent_id")
    private String parentId;

    /**
     * 资源名称
     */
    @TableField("name")
    private String name;

    /**
     * 资源类型（D目录 M菜单 B按钮）
     */
    @TableField("type")
    private String type;

    /**
     * 资源排序
     */
    @TableField("seq")
    private Integer seq;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 路由地址
     */
    @TableField("path")
    private String path;

    /**
     * 组件路径
     */
    @TableField("component")
    private String component;

    /**
     * 权限标识
     */
    @TableField("mid")
    private String mid;

    /**
     * 是否外链
     */
    @TableField("is_frame")
    private String isFrame;

    /**
     * 是否显示
     */
    @TableField("is_show")
    private String isShow;

    /**
     * 权限ID
     */
    @TableField("role_id")
    private String roleId;

    /**
     * 状态
     */
    @TableField("status")
    private String status;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    /**
     * 租户号
     */
    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private String tenantId;

    /**
     * 乐观锁
     */
    @TableField(value = "revision", fill = FieldFill.INSERT)
    @Version
    private Long revision;

    /**
     * 删除标识
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private String deleted;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getResId() {
        return resId;
    }

    public void setResId(String resId) {
        this.resId = resId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public String getIsFrame() {
        return isFrame;
    }

    public void setIsFrame(String isFrame) {
        this.isFrame = isFrame;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public Long getRevision() {
        return revision;
    }

    public void setRevision(Long revision) {
        this.revision = revision;
    }

    public String getDeleted() {
        return deleted;
    }

    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }

    @Override
    public String toString() {
        return "SysResInfo{" +
                "id = " + id +
                ", resId = " + resId +
                ", parentId = " + parentId +
                ", name = " + name +
                ", type = " + type +
                ", seq = " + seq +
                ", title = " + title +
                ", icon = " + icon +
                ", path = " + path +
                ", component = " + component +
                ", mid = " + mid +
                ", isFrame = " + isFrame +
                ", isShow = " + isShow +
                ", roleId = " + roleId +
                ", status = " + status +
                ", remark = " + remark +
                ", createdBy = " + createdBy +
                ", createdTime = " + createdTime +
                ", updatedBy = " + updatedBy +
                ", updatedTime = " + updatedTime +
                ", tenantId = " + tenantId +
                ", revision = " + revision +
                ", deleted = " + deleted +
                "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysResInfo info = (SysResInfo) o;
        return Objects.equals(id, info.id) && Objects.equals(resId, info.resId) && Objects.equals(parentId, info.parentId) && Objects.equals(name, info.name) && Objects.equals(type, info.type) && Objects.equals(seq, info.seq) && Objects.equals(title, info.title) && Objects.equals(icon, info.icon) && Objects.equals(path, info.path) && Objects.equals(component, info.component) && Objects.equals(mid, info.mid) && Objects.equals(isFrame, info.isFrame) && Objects.equals(isShow, info.isShow) && Objects.equals(roleId, info.roleId) && Objects.equals(status, info.status) && Objects.equals(remark, info.remark) && Objects.equals(createdBy, info.createdBy) && Objects.equals(createdTime, info.createdTime) && Objects.equals(updatedBy, info.updatedBy) && Objects.equals(updatedTime, info.updatedTime) && Objects.equals(tenantId, info.tenantId) && Objects.equals(revision, info.revision) && Objects.equals(deleted, info.deleted);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, resId, parentId, name, type, seq, title, icon, path, component, mid, isFrame, isShow, roleId, status, remark, createdBy, createdTime, updatedBy, updatedTime, tenantId, revision, deleted);
    }
}
